10 while (getline(cin
, s
)){
12 vector
<int> v(s
.size());
13 for (int i
=0; i
<s
.size(); ++i
) v
[i
] = s
[i
] - '0';
14 sort(v
.begin(), v
.end(), greater
<int>() );
17 for (int i
=0; i
<v
.size(); ++i
){
21 sort(v
.begin(), v
.end());
23 for (int i
=1; i
<v
.size(); ++i
){
31 for (int i
=0; i
<v
.size(); ++i
){
35 printf("%lld - %lld = %lld = 9 * %lld\n", a
, b
, a
-b
, (a
-b
)/9);